Skip to content

Conversation

@broBinChen
Copy link
Contributor

Problem Description

When running pnpm install from the root directory, the dependency hoisting strategy may be inconsistent with subdirectory configurations, causing module resolution issues (e.g., dayjs import errors).
fixed: #70

4bd86d69833768955160db807d56703b

Solution

Add .npmrc file at the root level to unify pnpm configuration across the entire workspace:

  • shamefully-hoist=true: Ensures dependencies are hoisted to the node_modules root directory, compatible with Nuxt/Vite module resolution mechanism
  • strict-peer-dependencies=false: Allows flexible peer dependency resolution to avoid installation failures

Impact

  • ✅ Ensures pnpm install works correctly when executed from the root directory
  • ✅ Unifies dependency hoisting strategy across the entire workspace
  • ✅ Maintains consistency with existing apps/www/.npmrc configuration

@snowbitx
Copy link
Contributor

snowbitx commented Dec 2, 2025

👍

Copy link
Collaborator

@cwandev cwandev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

@cwandev cwandev merged commit 4e236a6 into vuepont:main Dec 4, 2025
3 checks passed
@broBinChen broBinChen deleted the chore/add-root-npmrc-config branch December 5, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The project cannot correctly load the md example files when running locally

3 participants